//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//

package com.comprosoft.telnet.command;

import com.comprosoft.telnet.io.IOHandler;
import com.comprosoft.telnet.io.TextColor;
import com.comprosoft.telnet.server.TelnetServer;

public final class UnknownCommandHandler extends Command {
    private final String command;

    public UnknownCommandHandler(IOHandler io, String command, TelnetServer telnetServer) {
        super(io, "Unknown Command Handler", telnetServer);
        this.command = command;
    }

    protected CommandResult handleCommand(String[] args) {
        IOHandler io = super.getIOHandler();
        io.SetTextColor(TextColor.RED);
        io.WriteLine("Unknown command [" + this.command + "]");
        return CommandResult.COMMAND_OK;
    }
}
